#ifndef _TASK_H_
#define _TASK_H_

enum {
  MAX_NUM_POINTER = 3,
};

typedef void state;

struct _task {
  state (*fp)(struct _task *task);
  guint count;
  gboolean alive;
  gpointer pointer[MAX_NUM_POINTER];
  struct _task *prev;
  struct _task *next;
};

void task_init();
void task_free();
struct _task *task_add(state (*fp)(struct _task *task), ...);
void task_schedular();
#endif

